package com.coursehub.exercise.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

/**
 * 练习实体类
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "exercise")
public class Exercise {
    
    @Id
    @Column(name = "exercise_id", nullable = false, length = 100)
    private String exerciseId;
    
    @Column(name = "exercise_name", nullable = false, length = 100)
    private String exerciseName;
    
    @Column(name = "exercise_deadline", nullable = false)
    private LocalDateTime exerciseDeadline;
    
    @Column(name = "exercise_start_time", nullable = false)
    private LocalDateTime exerciseStartTime;
    
    @Column(name = "classes_id", nullable = false, length = 100)
    private String classesId;
    
    @Column(name = "is_multiple_submission", nullable = false)
    private Boolean isMultipleSubmission = false;
    
    @Column(name = "exercise_score", nullable = false)
    private Integer exerciseScore;
}